package com.kexilo.system.auth.vo;

import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;

/**
 * 令牌响应
 *
 * @author Kexilo
 */
@Schema(description = "令牌响应")
public class TokenResponse implements Serializable {
    
    private static final long serialVersionUID = 1L;

    /** 访问令牌 */
    @Schema(description = "访问令牌")
    private String accessToken;

    /** 刷新令牌 */
    @Schema(description = "刷新令牌")
    private String refreshToken;

    /** 令牌类型 */
    @Schema(description = "令牌类型")
    private String tokenType = "Bearer";

    /** 过期时间（秒） */
    @Schema(description = "过期时间（秒）")
    private Long expiresIn;

    /** 用户ID */
    @Schema(description = "用户ID")
    private Long userId;

    /** 用户名 */
    @Schema(description = "用户名")
    private String username;

    public TokenResponse() {
    }

    public TokenResponse(String accessToken, String refreshToken, Long expiresIn) {
        this.accessToken = accessToken;
        this.refreshToken = refreshToken;
        this.expiresIn = expiresIn;
    }

    public TokenResponse(String accessToken, String refreshToken, Long expiresIn, Long userId, String username) {
        this.accessToken = accessToken;
        this.refreshToken = refreshToken;
        this.expiresIn = expiresIn;
        this.userId = userId;
        this.username = username;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public String getTokenType() {
        return tokenType;
    }

    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }

    public Long getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(Long expiresIn) {
        this.expiresIn = expiresIn;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
